import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;


public class StringArrayTest {
	private static String[] slist1={
		"a","b","ccc","ccd","d","e","f","g"
	};
	private static String[] slist2={
		"a","b","ccd","ccc","g","f","e","d"
	};
	
	private StringArray array1;
	private StringArray array2;

	@Before
	public void setUp() throws Exception {
		array1=new StringArray(slist1);
		array2=new StringArray(slist2);
	}
	
	@Test
	public void testStringArray() {
		assertEquals(8,array1.size());		
		assertEquals(8,array2.size());	
	}

	@Test
	public void testIndexOf() {
		assertEquals(-1,array1.IndexOf("ee"));
		assertEquals(4,array1.IndexOf("d"));
	}
	

}